import ajax from './index'

//获取小店设置
export function settingShop(url){
   return ajax.get('/admin/setting/shop?'+url)
}

//设置获取时间
export function setOrderReturnDays(data){
    return ajax.post('/admin/setting/set/order_return_days',data)
}


//设置小店权限
export function setShopLimit(data){
    return ajax.post('/admin/setting/set/shop_limit',data)
}

//会员购物返利
export function setRebateRate(data){
     return ajax.post('/admin/setting/set/rebate_rate',data)
}

//获取模版消息列表
export function noticeTemplateMessagelist(url){
    return ajax.get('/admin/notice/template_message/list?'+url)
}


//开启模版消息
export function noticeTemplatemessageEnable(url){
   
    return ajax.post('/admin/notice/template_message/'+url+'/enable')
}

//关闭模版消息
export function noticeTemplatemessageDisable(url){
    return ajax.post('/admin/notice/template_message/'+url+'/disable')
}

//删除模版消息
export function noticeTemplatemessageDelete(url){
    return ajax.post('/admin/notice/template_message/'+url+'/delete') 
}

//修改模版消息
export function noticeTemplateMessageUpdate(url,data){
    return ajax.post('/admin/notice/template_message/'+url+'/update',data) 
}

//添加模版消息
export function  noticeTemplateMessageCreate(data){
    return ajax.post('/admin/notice/template_message/create',data)   
}


//轮播图列表
export function bannerList(data){
    return ajax.post('/admin/banner/list',data)
}

//添加修改banner
export function bannerAddmodify(data){
    return ajax.post('/admin/banner/add/modify',data)
}

//上下架轮播图
export function bannerUpDown(data){
    return ajax.post('/admin/banner/up/down',data)
}

//删除轮播图
export function bannerDelete(data){
    return ajax.post('/admin/banner/delete',data)
}

//提现限制设置
export function setWithdrawLimit(data){
    return ajax.post('/admin/setting/set/withdraw_limit',data)
}
//提现描述
export function setWithdrawDescription(data){
    return ajax.post('/admin/setting/set/withdraw_description',data)
}

//设置退款有效期
export function setRefundValidTerm(data){
    return ajax.post('/admin/setting/set/refund_valid_term', data)
}
//设置交易费率
export function setTransactionRate(data){
    return ajax.post('/admin/setting/set/transaction_rate', data)
}
//设置完善信息返回红包金额
export function setVipImproveRate(data){
    return ajax.post('/admin/setting/set/vip_improve_rebate',data)
}

//设置自营订单付款失效
export function setownorderInvalidtime(data){
    return ajax.post('/admin/setting/set/own_order_invalid_time',data)
}

//服务商权限
export function setSpServiceLimit(data){
    return ajax.post('/admin/setting/set/sp_limit', data)
}

//获取服务商设置信息
export function  getSpServiceLimit(){
    return ajax.get('/admin/setting/get/sp_limit')
}

//服务商服务费
export function setSpServicePrice(data){
    return ajax.post('/admin/setting/set/sp_service_price',data)
}

//小店服务费金额
export function setShopServicePrice(data){
    return ajax.post('/admin/setting/set/shop_service_price', data)
}

//佣金比例设置
export function settingCommissionRate(data){
    return ajax.post('/admin/setting/set/commission_rate', data)
}

//服务商提现代扣税设置
export function setWithDrawTaxDeductlimit(data){
   return ajax.post('/admin/setting/set/withdraw_tax_deduct_limit',data)
}

//合伙人相关权限设置
export function setPartnerlimit(data){
    return ajax.post('/admin/setting/set/partner_limit',data)
}

//获取合伙人设置
export function getPartnerlimit(){
    return ajax.get('/admin/setting/get/partner_limit')
}

//小店服务费金额设置
export function  setDepositConfig(data){
    return ajax.post('/admin/setting/set/shop_service_price/deposit_config',data)
}

//获取是否展示押金入驻的配置
export function isShowDepositJoinShop(){
    return ajax.get('/v2/wap/setting/is_show_deposit_join_shop')
}

//设置是否展示押金入驻
export  function  setShowDepositJoinShop(data){
    return ajax.post('/admin/setting/set/is_show_deposit_join_shop',data)
}
